import { DataSource } from 'typeorm';
import { Shipinleibie } from './entities/shipinleibie.entity';

export const shipinleibieProviders = [
  {
    provide: 'SHIPINLEIBIE_REPOSITORY', // 自定义的仓库令牌
    useFactory: (dataSource: DataSource) =>
      dataSource.getRepository(Shipinleibie), // 获取实体对应的 Repository
    inject: ['DATABASE_CONNECTION'], // 注入数据源
  },
];
